<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.google.appengine.api.users.User" %>
<%@ page import="com.google.appengine.api.users.UserService" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%@ page import="java.util.List" %>
<%@ page import="javax.jdo.PersistenceManager" %>
<%@ page import="rahcir.Shop" %>
<%@ page import="rahcir.PMF" %>

<html>
  <body>

<%
    String id = request.getParameter("id");
    PersistenceManager pm = PMF.get().getPersistenceManager();
	Shop s = pm.getObjectById(Shop.class, Integer.parseInt(id));
%>    
    <form action="/rahcir" method="post">
      <div>Shop Name:<input type="text" name="shopname" value="<%=s.getShopname() %>"></input></div>
      <div>Comment:<textarea name="comment" rows="3" cols="60" ><%=s.getComment().getValue() %></textarea></div>
      <div>Address:<input type="text" name="address" value="<%=s.getAddress() %>"></input></div>
      <div>Map URL:<input type="text" name="mapurl" value="<%=s.getMapurl().getValue() %>"></input></div>
      <div><input type="hidden" name="type" value="editShop"></input></div>      
      <div><input type="hidden" name="id" value="<%=s.getId()%>"></input></div>      
      <div><input type="submit" value="Save" /></div>
    </form>
<%
    pm.close();
%>

  </body>
</html>